Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tx track modif 7087 v14 #11915

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

catenacyber
Copy link
Contributor

Link to ticket: https://redmine.openinfosecfoundation.org/issues/
https://redmine.openinfosecfoundation.org/issues/7087

Describe changes:

  • app-layer: track modified/processed txs

#11912 with ftp-data using updated and trying to be smarter with some protocols only updating the right direction

To optimize detection, and logging, to avoid going through
all the live transactions when only a few were modified.

Ticket: 7087
Completes Ticket 7013
Copy link

codecov bot commented Oct 9, 2024

Codecov Report

Attention: Patch coverage is 93.47826% with 6 lines in your changes missing coverage. Please review.

Project coverage is 79.18%. Comparing base (6ae5ae7) to head (a682fa7).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11915      +/-   ##
==========================================
- Coverage   82.60%   79.18%   -3.42%     
==========================================
  Files         912      912              
  Lines      249342   249006     -336     
==========================================
- Hits       205968   197179    -8789     
- Misses      43374    51827    +8453     
Flag Coverage Δ
fuzzcorpus 60.72% <91.30%> (+0.09%) ⬆️
livemode 18.71% <0.00%> (-0.02%) ⬇️
pcap 44.11% <72.82%> (+0.03%) ⬆️
suricata-verify ?
unittests 58.99% <42.39%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 23069

@@ -155,6 +159,7 @@ impl AppLayerTxData {
file_flags: 0,
file_tx: 0,
stream_logged: 0,
updated: [true; 2],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

creating a new tx should not lead to it being updated in both dirs? Just in the dir it was created in?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, will optimize

@@ -200,6 +200,7 @@ impl TemplateState {
start = rem;

if let Some(tx) = self.find_request() {
tx.tx_data.updated[1] = true;
Copy link
Member

@victorjulien victorjulien Oct 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really like this indexing with just a number to indicate a direction. Can we either index by some name or use something like updated_ts / updated_tc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guess I will go for updated_ts as it is used in other parts of the code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants